#include<stdio.h>
int main(void)
{
    int x,y,z,n,temp;
    printf("Enter money:");
    scanf("%d",&n);
    for(x = 0;x <= n/5;x ++)
    {
        for(y = 0;y <= n/3;y ++)
        {
            z = n - x - y;
            if(3*n == 15 * x + 9 * y + z )
			if(x<y)
            printf("%2d,%2d,%2d\n",x,y,z);
            else
            printf("%2d,%2d,%2d\n",y,x,z);
        }
    }
    return 0;
} 
